div#admin-misc.container-fluid.view.col-sm-12.col-md-10.col-lg-8
    script#menu-add-save(type="text/html")
        include menu-add-save-tpl
    script#menu-edit(type="text/html")
        include menu-edit-tpl
    div.panel.panel-default
        div.panel-heading
            div.panel-title
                a(data-bind="click: mainNavlinks.toggle", href="javascript:void 0")
                    h4
                        span.glyphicon.glyphicon-link
                        span(data-bind="translate: 'MAIN_MENU'")
        div.panel-body(data-bind="visible: mainNavlinks.visible")
            div.row(data-bind="template: {name: 'menu-add-save', data: mainNavlinks}")
            form.form(role="form", data-bind="attr: {id: mainNavlinks.formId, name: mainNavlinks.formId}, template: {name: 'menu-edit', data: mainNavlinks}, submit: mainNavlinks.save")
            div.row(data-bind="visible: mainNavlinks.navlinks().length>2, template: {name: 'menu-add-save', data: mainNavlinks}")
            div.row
                div.panel-body
                    nav.bg-info
                        ul.list-unstyled.list-inline(data-bind="foreach: {data: mainNavlinks.navlinks, as: 'navlink'}")
                            li
                                a.btn.btn-link(data-bind="attr: {href: navlink.url, target: navlink.newWindow()?'_blank':''}, css: {'disabled': navlink.disabled}, visible: navlink.visible")
                                    span(data-bind="visible: navlink.icon, attr: {'class': 'glyphicon '+navlink.icon()}")
                                    b(data-bind="text: navlink.text")
    div.panel.panel-default
        div.panel-heading
            div.panel-title
                a(data-bind="click: footerNavlinks.toggle" href="javascript:void 0")
                    h4
                        span.glyphicon.glyphicon-hand-down
                        span(data-bind="translate: 'FOOTER_MENU'")
        div.panel-body(data-bind="visible: footerNavlinks.visible")
            div.row(data-bind="template: {name: 'menu-add-save', data: footerNavlinks}")
            form.form(data-bind="attr: {id: footerNavlinks.formId, name: footerNavlinks.formId}, template: {name: 'menu-edit', data: footerNavlinks}, submit: footerNavlinks.save" role="form")
            div.row(data-bind="visible: footerNavlinks.navlinks().length>2, template: {name: 'menu-add-save', data: footerNavlinks}")
            div.row(data-bind="visible: footerNavlinks.navlinks().length")
                div.col-sm-12
                    h4(data-bind="translate: 'PREVIEW'")
            div.row
                div.panel-body
                    nav.bg-info
                        ul.list-unstyled(data-bind="foreach: {data: footerNavlinks.navlinks, as: 'navlink'}")
                            li
                                a(data-bind="attr: {href: navlink.disabled()? null:navlink.url(), target: navlink.newWindow()?'_blank':''}, css: {'disabled': navlink.disabled}, visible: navlink.visible")
                                    span(data-bind="visible: navlink.icon, attr: {'class': 'glyphicon '+navlink.icon()}" class='{{navlink.icon}}')
                                    b(data-bind="text: navlink.text")
    div.panel.panel-default
        div.panel-heading
            div.panel-title
                a(data-bind="click: appSettings.toggle", href="javascript:void 0")
                    h4
                        span.glyphicon.glyphicon-wrench
                        span(data-bind="translate: 'SETTINGS_EDITOR'")
        div.panel-body(data-bind="visible: appSettings.visible")
            div.row
                div.col-sm-12
                    div.btn-group.btn-group-sm
                        button.btn.btn-primary(data-bind="attr: {form: appSettings.formId, disabled: appSettings.saveDisabled}", type="submit")
                            span.glyphicon.glyphicon-save
                            span(data-bind="translate: 'SAVE'")
            form.form.form-horizontal(data-bind="with: appSettings.settings, attr: {id: appSettings.formId, name: appSettings.formId}, submit: appSettings.save" role="form")
                div.form-group
                    label.col-lg-4.col-md-4.col-sm-4.control-label(data-bind="translate: 'SITE_TITLE'" for=siteTitle)
                    div.col-lg-8.col-md-8.col-sm-8
                        input.form-control(data-bind="value: siteTitle", id="siteTitle", type="text", required, placeholder="Enter site title")
                div.form-group
                    label.col-lg-4.col-md-4.col-sm-4.control-label(data-bind="translate: 'AUTHOR_DISPLAY_NAME'", for="authorDisplayName")
                    div.col-lg-8.cl-md-8.col-sm-8
                        input.form-control(data-bind="value: authorDisplayName", id="authorDisplayName", type="text", required, placeholder="Author display name")
                div.form-group
                    label.col-lg-4.col-md-4.col-sm-4.control-label(data-bind="translate: 'AUTHOR_DISPLAY_BIO'", for="authorDisplayBio")
                    div.col-lg-8.cl-md-8.col-sm-8
                        input.form-control(data-bind="value: authorDisplayBio", id="authorDisplayBio", type="text", placeholder="Author display bio")
                div.form-group
                    label.col-lg-4.col-md-4.col-sm-4.control-label(data-bind="translate: 'AUTHOR_TWITTER_NAME'", for="authorTwitterScreenName")
                    div.col-lg-8.cl-md-8.col-sm-8
                        input.form-control(data-bind="value: authorTwitterScreenName", id="authorTwitterScreenName", type="text", placeholder="Author twitter screen name")
                div.form-group
                    label.col-lg-4.col-md-4.col-sm-4.control-label(data-bind="translate: 'FOOTER_ANNOTATION'", for="footerAnnotation")
                    div.col-lg-8.cl-md-8.col-sm-8
                        input.form-control(data-bind="value: footerAnnotation", id="footerAnnotation", type="text", placeholder="Annotation")
                div.form-group
                    label.col-lg-4.col-md-4.col-sm-4.control-label(data-bind="translate: 'POSTS_PER_PAGE'", for="postsPerPage")
                    div.col-lg-8.cl-md-8.col-sm-8
                        input.form-control(data-bind="value: postsPerPage", id="postsPerPage", type="number", required, placeholder="Posts on one page")
                div.form-group
                    label.col-lg-4.col-md-4.col-sm-4.control-label(data-bind="translate: 'METATITLE'", for="siteMetatitle")
                    div.col-lg-8.cl-md-8.col-sm-8
                        input.form-control(data-bind="value: metaTitle", id="siteMetatitle", type="text", placeholder="Meta title")
                div.form-group
                    label.col-lg-4.col-md-4.col-sm-4.control-label(data-bind="translate: 'METADESCRIPTION'", for="siteMetadescription")
                    div.col-lg-8.cl-md-8.col-sm-8
                        textarea.form-control(data-bind="value: metaDescription", id="siteMetadescription", type="text", placeholder="Meta description (few words)")
                div.form-group
                    label.col-lg-4.col-md-4.col-sm-4.control-label(data-bind="translate: 'TITLE_IMAGE_URL'", for="title-image")
                    div.col-lg-8.col-md-8.col-sm-8
                        input.form-control(data-bind="value: titleImageUrl, valueUpdate: 'input'", id="title-image", type="url", placeholder="Main image (absolute url required)")
                div.form-group
                    div.main-wrapper
                        div.main-image(data-bind="style: {backgroundImage: 'url(' + titleImageUrl() +')'}")
                div.form-group
                    label.col-lg-4.col-md-4.col-sm-4.control-label(data-bind="translate: 'AUTHOR_AVATAR_URL'", for="avatarUrl")
                    div.col-lg-4.cl-md-4.col-sm-4
                        input.form-control(data-bind="value: authorAvatarUrl, valueUpdate: 'input'", id="avatarUrl", type="url", placeholder="Avatar url (absolute url required)")
                    div.col-lg-4.cl-md-4.col-sm-4
                        img.author-avatar(data-bind="attr: {src: authorAvatarUrl}", style="height:100px")
            div.row
                div.col-sm-12
                    div.btn-group.btn-group-sm
                        button.btn.btn-primary(data-bind="attr: {form: appSettings.formId, disabled: appSettings.saveDisabled}", type="submit")
                            span.glyphicon.glyphicon-save
                            span(data-bind="translate: 'SAVE'")




